 package cn.edu.scau.cmi.zhengweixin.spring;

import org.springframework.context.ApplicationContext;
import cn.edu.scau.cmi.zhengweixin.spring.domain.Student;
import cn.edu.scau.cmi.zhengweixin.spring.util.ApplicationContextUtil;


public class SpringClient {

	public SpringClient() {
	}

	public static void main(String[] args) {
		//单例ApplicationContext
		ApplicationContext applicationContext=ApplicationContextUtil.getApplicationContext();	
		Student student1=(Student) applicationContext.getBean("zhengweixin");
		System.out.println(student1.getName()+"的毕业设计指导导师是："+student1.getTutor().getName());		
	}

}
